package com.jxdinfo.hussar.cloud.module.example.dljc.basketdataalarm.controller;

import com.jxdinfo.hussar.cloud.module.example.dljc.basketdataalarm.vo.BasketDataAlarmSearchVO;
import com.jxdinfo.hussar.cloud.module.example.dljc.basketdataalarm.vo.BasketDataAlarmVO;
import com.jxdinfo.hussar.support.mp.base.controller.HussarBaseController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jxdinfo.hussar.support.audit.core.annotations.AuditLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jxdinfo.hussar.support.audit.core.enums.AuditEventGrade;
import com.jxdinfo.hussar.support.audit.core.enums.AuditEventType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PostMapping;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jxdinfo.hussar.cloud.module.example.dljc.basketdataalarm.vo.BasketDataAlarmPageVO;
import com.jxdinfo.hussar.cloud.module.example.dljc.basketdataalarm.model.BasketDataAlarm;
import org.springframework.beans.factory.annotation.Autowired;
import com.jxdinfo.hussar.cloud.module.example.dljc.basketdataalarm.service.BasketDataAlarmService;
import com.jxdinfo.hussar.platform.core.base.apiresult.ApiResponse;

import java.util.List;

/**
 * 吊篮 报警数据控制器
 */
@RestController(value = "dljc.basketdataalarm.BasketDataAlarmController")
@AuditLog(moduleName = "吊篮 报警数据")
@RequestMapping(value = "/dljc/basketDataAlarm")
public class BasketDataAlarmController extends HussarBaseController<BasketDataAlarm, BasketDataAlarmService> {

    private static final Logger logger = LoggerFactory.getLogger(BasketDataAlarmController.class);

    @Autowired
    private BasketDataAlarmService basketDataAlarmService;

    /**
     * 吊篮报警数据条件查询
     *
     * @param basketDataAlarmSearchVO
     * @return 查询结果
     */
    @AuditLog(moduleName = "吊篮报警数据", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @PostMapping("findByList")
    public ApiResponse<List<BasketDataAlarmVO>> findByList(@RequestBody BasketDataAlarmSearchVO basketDataAlarmSearchVO) {
        //todo 没有获取项目编号工具类
        return basketDataAlarmService.findByList(basketDataAlarmSearchVO);
    }

}
